-
-
Notifications
You must be signed in to change notification settings - Fork 20
Use the TooltippedIconButton in toolbars
#319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jtpio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brichet!
Looks good, left a couple of minor comments.
packages/jupyter-chat/src/components/input/buttons/cancel-button.tsx
Outdated
Show resolved
Hide resolved
| props: TooltippedIconButtonProps | ||
| ): JSX.Element { | ||
| // Override the default icon font size from 'medium' to 'small' | ||
| props.children.props.fontSize = props.fontSize ?? 'small'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the props be directly mutated? Wondering if there could be side-effects to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU, if one wants to use a bigger button (iconButtonProps.size = 'large'), it makes probably sense to be able to set the font size too.
Co-authored-by: Jeremy Tuloup <[email protected]>
|
Thanks for the review @jtpio |
This PR restore the use of
TooltippedIconButtonin chat toolbars (input, message and code), that has been partially removed in #298.It aligns the tooltipped buttons style to the recent changes in button UI brought by #298.
This will help homogenize the buttons in the chat itself, but also for extension adding buttons to the input toolbar.
Related to #303
Could help with jupyterlite/ai#218
cc. @jtpio @ellisonbg